Skip to content

Fuzzer: Do not return 0 from upTo when input is finished#8653

Merged
kripken merged 2 commits intoWebAssembly:mainfrom
kripken:fuzz.nostop
Apr 28, 2026
Merged

Fuzzer: Do not return 0 from upTo when input is finished#8653
kripken merged 2 commits intoWebAssembly:mainfrom
kripken:fuzz.nostop

Conversation

@kripken
Copy link
Copy Markdown
Member

@kripken kripken commented Apr 28, 2026

This was added to simplify our output when the random data is small - it
makes us pick simpler options, which helps a little there - but the downsides
are large, so revert this part.

Specifically, we consume all the random input to generate functions. We
then do a small amount of random usage at the end, things like export
mutation. To handle that, we keep returning random values even after
the random input is consumed (using some xor-ing to try to keep things
random). But if we just return 0 at that point, we are missing out on a lot of
variety.

This was added in #7832. All the rest of that PR makes sense - we can
check for the end of the random data and do simpler things - but we
should not do the simplest possible thing in the generic upTo method
which would simplify everything, even things we don't want to.

@kripken kripken requested a review from a team as a code owner April 28, 2026 18:22
@kripken kripken requested review from tlively and removed request for a team April 28, 2026 18:22
Copy link
Copy Markdown
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

@kripken kripken merged commit 257298c into WebAssembly:main Apr 28, 2026
16 checks passed
@kripken kripken deleted the fuzz.nostop branch April 28, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants